package com.bailan.foreat.controller;


import com.bailan.foreat.service.CommentService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ste
 * @since 2023-02-21 07:50:43
 */
@RestController
@RequestMapping("/comment")
public class CommentController {
    @Autowired
    private CommentService commentService;
    @RequestMapping("/select")
    public IPage select(
            @RequestParam(defaultValue = "1") Integer currentPage,
            @RequestParam(defaultValue = "2") Integer pageSize,
            @RequestParam(defaultValue = "0") Integer productId
    ){
        return  commentService.selectAll(currentPage, pageSize,productId);

    }

}

